package com.neusoft.adminweb.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.neusoft.adminweb.entity.Admin;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.List;

/**
 * @Author: duan
 * @Date: Create in 11:35 2020/11/14
 */
public interface BaseController<T> {

    @GetMapping("queryById")
    public T queryById(Integer id);

    @GetMapping("toAddOrEdit")
    public String toAddOrEdit(Integer id, Model result) ;

    @PostMapping("save")
    public String save(T bean, Model result);

    @GetMapping("toList")
    public String toList(Integer pageNum, Integer pageSize, Model result);

    @PostMapping("search")
    public String search(T args, Integer pageNum, Integer pageSize, Model result);

    @GetMapping("delete")
    public String delete(Integer id);

}
